package com.quantum.remoting;


import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;


import flex.messaging.io.PropertyProxyRegistry;

/**
 * <listener>
		<listener-class>com.pktech.tp.flex.serialization.PropertyProxyRegistryListener</listener-class>
	</listener>
	
	
 static { PropertyProxyRegistry.getRegistry().register(MyEnum.class, new
 * EnumProxy()); }
 * 
 * (you can put this in any class that gets loaded at startup in the same class
 * loader as BlazeDS such as an application scoped remote object)
 * 
 * 
 * Hi,
 * 
 * I am using SpringFramework and to be easier, instead of:
 * 
 * static { PropertyProxyRegistry.getRegistry().register(MyEnum.class, new
 * EnumProxy()); }
 * 
 * I changed to:
 * 
 * static { PropertyProxyRegistry.getRegistry().register(Enum.class, new
 * EnumPropertyProxy()); }
 * 
 * This solution is cool!!
 * 
 * @author nathanleewei
 * 
 */
public class PropertyProxyRegistryListener implements ServletContextListener {

	static {
		PropertyProxyRegistry.getRegistry().register(Enum.class, new EnumProxy());
		PropertyProxyRegistry.getRegistry().register(InputStreamAware.class, new InputStreamBeanProxy());
	}

	public void contextDestroyed(ServletContextEvent event) {

	}

	public void contextInitialized(ServletContextEvent event) {

	}

}
